//
//  GameNewsDetailViewController.m
//  课余时间
//
//  Created by zgr on 16/4/7.
//  Copyright © 2016年 张大少. All rights reserved.
//

#import "GameNewsDetailViewController.h"
#import "UIColor+AddColor.h"
@interface GameNewsDetailViewController ()

@end

@implementation GameNewsDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor shenhuiseColor];
    
    UILabel *title = [[UILabel alloc]initWithFrame:CGRectMake(50, 30,KWIDTH - 100 , 30)];
    title.text = @"资讯详情";
    title.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:title];
    
    UIButton *back = [UIButton buttonWithType:UIButtonTypeSystem];
    [back setTitle:@"返回" forState:UIControlStateNormal];
    [back addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    back.frame = CGRectMake(5, 30, 40, 30);
    [self.view addSubview:back];
    
    
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 60, KWIDTH, KHEIGHT - 60)];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:_article_url]];
    [webView loadRequest:request];
    [self.view addSubview:webView];
    
    // Do any additional setup after loading the view.
}
-(void)back:(UIButton *)button
{
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
